import requests

from config import BASE_URL


class LoginApi(object):

    @classmethod
    def login(cls, body):
        url = BASE_URL + "/api/sys/login"
        headers = {"Content-Type": "application/json"}
        resp = requests.post(url, headers=headers, json=body)
        return resp

if __name__ == '__main__':
    body = {"mobile": "13800000002", "password": "123456"}
    # result = LoginApi().login(body)
    result = LoginApi.login(body)
    print(result.json())